<!--  -->
<template>
  <div id="topicDetail">
    <!-- 顶部导航 -->
    <van-nav-bar
      title="专题详情"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="detail" v-html="detail.content"></div>

  </div>
</template>

<script>
import axios from 'axios'
import api from '../../src/assets/config/api'
export default {
  props:['id'],
  data () {
    return {
      detail: {}
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    }
  },
  async created() {
    let res = await axios.get(api.TopicDetail,{params:{id:this.id}})
    console.log(res)
    return this.detail = res.data.data
  }
}
</script>

<style lang="less" scoped>
  #topicDetail{
    /deep/.detail img{
      width: 100%;
    }
    
    
  }

</style>
